﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Farigola.Engine.SystemData.Entity.Type
{
    /// <summary>
    /// A type class data member.
    /// </summary>
    public class EntTypeClassDataMember : EntTypeBase
    {
        // id
        //private EntityId _id;

        /**
         * the name of the DM.
         */
        //private String _name;

        // systOrUser
        // aad it?

        /// <summary>
        /// type of entity data member.
        /// </summary>
        private EntTypeBase _entTypeDM;

        //=====================================================================
        #region Constructors.

        //---------------------------------------------------------------------
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="name"></param>
        /// <param name="entType"></param>
        public EntTypeClassDataMember(EntityId id, String name, EntTypeBase entType)
            : base(EntityDef.TypeSystOrUser.User, id, name)
        {
            //_id = id;
            //_name = name;
            _entTypeDM = entType;
        }

        #endregion


        //=====================================================================
        #region Get/Set methods.

        //---------------------------------------------------------------------
        //public EntityId getId()
        //{
        //    return _id;
        //}

        //---------------------------------------------------------------------
        //public String getName()
        //{
        //    return _name;
        //}

        //---------------------------------------------------------------------
        /// <summary>
        /// Return the type of the data member.
        /// </summary>
        /// <returns></returns>
        public EntTypeBase GetEntTypeBase()
        {
            return _entTypeDM;
        }

        #endregion

        //---------------------------------------------------------------------
        /**
         * Return true if the provided name is equals to the inner name.
         * 
         * @param n
         * @return
         */
        //public bool isNameEquals(String n)
        //{
        //    if (n == null)
        //        return false;
        //    if (n.Equals(_name,StringComparison.OrdinalIgnoreCase))
        //        return true;

        //    return false;
        //}
    }
}
